package com.example.qggoodsconsumer.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "qggoodsprovider")
public interface GoodsFeign {
    @RequestMapping("/getAllGoods")
    public List<Map> getAllGoods();

    @RequestMapping("/getAllGoodsByQgTotal")
    public List<Map> getAllGoodsByQgTotal();

    @RequestMapping("/addTempSotck")
    public int  addTempSotck(@RequestParam Map map);

    @RequestMapping("/getStock")
    public int getStock(@RequestParam("goodsId") int goodsId);


    @RequestMapping("/getQgTotalByGoodsId")
    public int getQgTotalByGoodsId(@RequestParam("goodsId") int goodsId);

    @RequestMapping("/getCountByGoodsIdUid")
    public int getCountByGoodsIdUid(@RequestParam Map map);

    @RequestMapping("/getById")
    public Map getById(@RequestParam("goodsId") int goodsId);
}


